package com.wecan.base.PO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.wecan.base.PO.base.BasePO;
import com.wecan.base.enums.ExceptionType;
import com.wecan.base.enums.IsNotIsStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @Author liuzhihao
 * @Date 2022.04.09
 * @Version ${version}
 * @Description ${description}
 */
@Data
public class BusinessException extends BasePO {

    @Schema(title = "主键id")
    @TableId(type = IdType.AUTO, value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long id;

    @Schema(title = "异常类型")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ExceptionType type;

    @Schema(title = "主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long primaryId;

    @Schema(title = "异常参数")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String params;

    @Schema(title = "异常是否处理")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private IsNotIsStatus status;
}
